<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>99乘法表</title>
		<style>
			td {
				border: 20px solid #FFA07A;
			}
		</style>
		<script>
			onload = function() {
				//					var f = function() {
				function f() {
					document.write("<table align='center'bgcolor='#ADD8E6'>");
					for(var i = 1; i <= 9; i++) {
						document.write("<tr>");
						for(var j = 1; j <= i; j++) {
							document.write("<td>");
							document.write(i + " * " + j + " = " + (i * j) + "&nbsp");
							document.write("</td>");
						}
						//				document.write("</br>");
						document.write("</tr>");
					}
					document.write("</table>");
				}
				f();

				/* 案例二: 输出 [1,100]的随机数.*/
				var raNum = function() {
					/*[0,1)*/
					return Math.random();
				}
				/*[0,100) 向下取整.*/
				var targetNum = Math.floor(raNum() * 100) + 1;
				//				document.write(raNum());
				document.write(targetNum);
			}

			//  ========== 
			//  = Hello notation! = 
			//  ========== 
			//			Document.write(a);错误!
		</script>
	</head>

	<body>
		<p> Hello! </p>
	</body>

</html>